package training.project.app.web.converters;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.convert.converter.Converter;

import training.project.app.domain.FlightClient;
import training.project.app.service.FlightClientService;


public class StringToFlightClientConverter implements Converter<String, FlightClient>
	{
		@Autowired
		private FlightClientService flightClientService;

		public FlightClient convert(String clientId)
			{
				return flightClientService.getFlightClientById(new Integer(clientId));
			}
	}
